The present invention discloses a system and associated method for dynamically optimizing workload distribution in a cloud computing system based on operating cost. Conventional workload optimization methods in cloud computing systems use static planning for overall operation. Since software licenses are required to run software application programs that services clients of the cloud computing system, statically planning the number of software licenses in the cloud computing system causes operating cost issues. When the cloud computing system acquires enough number of software licenses to fully utilize all physical servers at all time, the cloud computing system incurs unnecessary additional software license cost. Having too few number of software licenses to reduce extra cost may degrade utilization of the physical servers and performance of the cloud computing system.